#include "ALPKAZE.h"

CALPKAZE::CALPKAZE()
{
}

CALPKAZE::CALPKAZE(CALStepItem* pStepItem)
{
	m_pStepItem = pStepItem;
}


CALPKAZE::~CALPKAZE()
{
}


void CALPKAZE::test()
{

}
void CALPKAZE::convert()
{
	if (m_pStepItem == NULL) return;

	try
	{
		CALSIPKAZE* pStepItem = (CALSIPKAZE*)m_pStepItem;

		if (pStepItem != NULL)
		{

			bool extended = pStepItem->GetItemExtended();
			bool upright = pStepItem->GetItemUpright();
			float threshold = pStepItem->GetItemThreshold();
			int nOctaves = pStepItem->GetItemOctaves();
			int nOctaveLayers = pStepItem->GetItemOctaveLayers();
			KAZE::DiffusivityType diffusivity = (KAZE::DiffusivityType)pStepItem->GetItemDiffusivity();

			//bool extended = false;
			//bool upright = false;
			//float threshold = 0.001f;
			//int nOctaves = 4;
			//int nOctaveLayers = 4;
			//KAZE::DiffusivityType diffusivity = KAZE::DIFF_PM_G2;

			std::vector<KeyPoint> keyPoints;
			Ptr<KAZE> fast = KAZE::create(extended, upright, threshold, nOctaves, nOctaveLayers, diffusivity);
			fast->detect(m_srcMat, keyPoints);

			drawKeypoints(m_srcMat, keyPoints, m_dstMat, Scalar::all(255), DrawMatchesFlags::DEFAULT);

			SetDstType(AL_DST_Mat_One);
		}
	}
	catch (...)
	{

	}
}

void CALPKAZE::convert(const Mat &src, Mat &dst)
{

}